<!DOCTYPE html>
<html lang="<%= I18n.locale %>" class="h-full bg-gray-50" dir="<%= t("dir") %>">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">

    <%= csrf_meta_tags %>
    <%= csp_meta_tag %>
    <%= render_open_graph_tags %>
    <%= render "shared/favicon_tags" %>
    <%= render AlternateLinksComponent.new %>

    <%= stylesheet_link_tags %>
    <%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %>

    <%= analytics_tag %>
    <%= hotwire_livereload_tags %>
  </head>

  <body data-controller="analytics--page-views" class="min-h-full flex flex-col">
    <div class="flex-1">
      <%= render ImpersonatingBannerComponent.new %>
      <%= render NavBar::BaseComponent.new(current_user) %>
      <%= render "shared/main" do %>
        <%= yield %>
      <% end %>
    </div>
    <%= render "shared/footer" unless turbo_native_app? %>
    <%= turbo_frame_tag "modal" %>
    <%= render Analytics::EventComponent.new(flash) %>
  </body>
</html>
